home *** CD-ROM | disk | FTP | other *** search
- *******************************************************************************
- * PROGRAM: Categors.wfm
- *
- * WRITTEN BY: Borland Samples Group
- *
- * DATE: 1/94
- *
- * UPDATED: 5/95
- *
- * REVISION: $Revision: 1.32 $
- *
- * VERSION: Visual dBASE
- *
- * DESCRIPTION: This form is a view of all the available music and other
- * categories of items sold in the Musical Methods store. You
- * can view just a list of the available categories, or select
- * to see a view of all the available items that belong to the
- * selected category.
- *
- * PARAMETERS: None
- *
- * CALLS: Categors.qbe (view of tables)
- * Music.cc (for custom pushbuttons)
- * View.mnu (menu file)
- * View.pop (popup file)
- * Music.prg (procedure file)
- *
- * USAGE: DO Categors.wfm
- *
- *******************************************************************************
- #include "Music.h"
-
- create session
- set talk off
- set ldcheck off
-
- ** END HEADER -- do not remove this line*
- * Generated on 06/19/94
- *
- parameter bModal
- local f
- f = new CATEGORSFORM()
- if (bModal)
- f.mdi = .F. && ensure not MDI
- f.ReadModal()
- else
- f.Open()
- endif
- CLASS CATEGORSFORM OF FORM
- Set Procedure to Music.cc additive
- this.ReleaseOnClose = .F.
- this.Minimize = .F.
- this.MousePointer = 1
- this.Maximize = .F.
- this.HelpFile = "Music.hlp"
- this.HelpId = "Categories"
- this.Text = "Categories"
- this.Width = 44.54
- this.View = "CATEGORS.QBE"
- this.Top = 1.73
- this.MenuFile = "VIEW.MNU"
- this.Left = 14.79
- this.Height = 14.02
- this.OnOpen = CLASS::ONOPEN
- this.OnClose = CLASS::ONCLOSE
- this.ColorNormal = "W"
-
- DEFINE RECTANGLE LISTRECT OF THIS;
- PROPERTY;
- Border .T.,;
- BorderStyle 1,;
- Text "",;
- ColorNormal "W*/R",;
- Width 41.82,;
- Top 0.50,;
- Left 1.19,;
- Height 9.15
-
- DEFINE MUSICBUTTON ITEMSBUTTON OF THIS;
- PROPERTY;
- UpBitmap "RESOURCE #108",;
- HelpFile "Music.hlp",;
- HelpID "Items",;
- Text "&Items...",;
- ColorNormal "N/W",;
- StatusMessage "Show available items matching the current selection. Press F1 for Help.",;
- Width 14.11,;
- Default .T.,;
- Top 11.94,;
- Left 13.94,;
- Height 1.50
-
- DEFINE CLOSEMBUTTON CLOSEFORMBUTTON OF THIS;
- PROPERTY;
- Width 14.11,;
- Top 11.94,;
- Left 28.73,;
- Height 1.50
-
- DEFINE IMAGE LOGOIMAGE OF THIS;
- PROPERTY;
- DataSource "FILENAME SMLMUSIC.BMP",;
- Width 10.71,;
- Top 9.95,;
- Left 1.19,;
- Height 3.83,;
- Alignment 2
-
- DEFINE LISTBOX DESCRIPTLIST OF THIS;
- PROPERTY;
- Visible .F.,;
- DataSource "FIELD CATEGORS->DESCRIPT",;
- FontSize 9.00,;
- ColorHighLight "W+/R",;
- ColorNormal "N/W*",;
- Width 39.61,;
- Top 1.78,;
- Left 2.21,;
- ID 800,;
- Height 7.54
-
- DEFINE TEXT CATEGORYTEXT OF THIS;
- PROPERTY;
- Border .F.,;
- Text " Music Categories :",;
- ColorNormal "W/R",;
- Width 19.55,;
- Top 0.72,;
- Left 1.87,;
- Height 1.01,;
- Alignment 3
-
- ****************************************************************************
- PROCEDURE OnOpen
- ****************************************************************************
-
- if _app.framewin.text = MUSIC_APP_TITLE && If called from Music.prg
- EnableViews(this) && enable viewing other items.
- trackWindows.AddWindow(form) && Keep track of open windows
-
- else && otherwise
- set procedure to Music.prg additive && Make Music.prg procedure file
- endif
-
- *** Define corresponding items (initially not visible)
- DefineCorrespondingItems(form)
-
- *** View Window Settings
- this.OnSize = SizeForm && Procedure in music.prg
-
- *** Assign the SpeedMenu for this form
- set procedure to View.pop additive
- this.popupMenu = new ViewPopup(this, "ViewPopup")
-
- *** Menu Settings
- this.root.view.organization.enabled = .F.
- this.root.view.organization.rank.enabled = .F.
- this.root.view.organization.artist.enabled = .F.
- this.root.view.organization.title.enabled = .F.
- this.root.view.browse.enabled = .F.
- this.popupMenu.organization.enabled = .F.
- this.popupMenu.organization.rank.enabled = .F.
- this.popupMenu.organization.artist.enabled = .F.
- this.popupMenu.organization.title.enabled = .F.
- this.popupMenu.browse.enabled = .F.
- this.root.AssignWindowMenu()
-
-
- * Link listbox to the unSKIPped list of parent records
- this.descriptList.dataSource = "FIELD CATEGORS->DESCRIPT"
- this.descriptList.visible = .T. && Make it visible here so don't
- && see flickering in form
-
- set skip to && Parent records shown only once
- this.filter = .F. && no filter is set yet
-
- this.musicIsOpen = .F. && Corresponding items not visible
- && yet
-
- this.itemsButton.OnClick = CorrespondingItems && procedure in Music.prg
-
-
- ****************************************************************************
- PROCEDURE OnClose
- ****************************************************************************
-
- if _app.framewin.text = MUSIC_APP_TITLE
- trackWindows.DeleteWindow(form)
- else
- close procedure Music.prg
- endif
- close procedure Music.cc, View.pop
-
-
- ENDCLASS
-
-
-
-
-
-